package com.zbl.javaDemo;

import com.zbl.CreateDemo;

public class ThreadLocalDemo {
    public static ThreadLocal<CreateDemo> threadLocal = new ThreadLocal<>();

    public void set() {
        threadLocal.set(new CreateDemo());
    }

    public CreateDemo get() {
        try {
            this.finalize();
        } catch (Throwable e) {
            throw new RuntimeException(e);
        }
        return threadLocal.get();
    }
}
